import request from '@/utils/request'

// 查询工厂模型列表
export function listShop(query) {
  return request({
    url: '/base/shop/list',
    method: 'get',
    params: query
  })
}

// 查询工厂模型详细
export function getShop(shopId) {
  return request({
    url: '/base/shop/' + shopId,
    method: 'get'
  })
}
// 查询根据工厂id获取下级节点列表
export function getShopByType(type) {
  return request({
    url: 'base/shop/getTreeFindType/' + type,
    method: 'get'
  })
}
// 根据T考型获取树节点
export function getTreeFindId(id) {
  return request({
    url: 'base/shop/getTreeFindId/' + id,
    method: 'get'
  })
}

// 新增工厂模型
export function addShop(data) {
  return request({
    url: '/base/shop',
    method: 'post',
    data: data
  })
}
// 查询工厂建模下拉树结构
export function treeselect() {
  return request({
    url: '/base/shop/treeselect',
    method: 'get'
  })
}
// 修改工厂模型
export function updateShop(data) {
  return request({
    url: '/base/shop',
    method: 'put',
    data: data
  })
}

// 删除工厂模型
export function delShop(shopId) {
  return request({
    url: '/base/shop/' + shopId,
    method: 'delete'
  })
}

// 导出工厂模型
export function exportShop(query) {
  return request({
    url: '/base/shop/export',
    method: 'get',
    params: query
  })
}
